Skip to main content

ReliableProperty<T>

ReliableProperty<T>

A ReliableProperty writes and reads primitives and structs on the reliable channel.

Events

onDidRevert

event OnDidRevertDelegate onDidRevert

Called when an anticipated change was rejected by the server, and the value has been reverted to the last value that was received from the server.

Properties

value

T value { get; set; }

dirty

bool dirty { get; }

True if the property has local changes.

Methods

WriteLength

int WriteLength(StreamContext context)

Write

bool Write(WriteStream stream, StreamContext context)

Read

bool Read(ReadStream stream, StreamContext context)

Confirm

void Confirm(uint updateID, StreamContext& context)

Confirm an update as received by the server. This is _not_ an acknowledgement that the property value was accepted, only that the update is no longer inflight. If the property value was accepted, it is sent back to the local client in the preceding read.

  • updateID:The ID of the update to confirm.
  • context:The context of the current deserialization pass.
  • UnsubscribeCallback

    void UnsubscribeCallback()

    Unsubscribe the inflight notification. The local value will remain unchanged.